package com.jxy.man_media;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication//扫描所在包及子包的bean，注入到ioc中
@EntityScan("com.jxy.edu.domain.media")//扫描实体类
@ComponentScan(value = "com.jxy.edu.api")
@ComponentScan(value ="com.jxy.man_media" )
@ComponentScan(value = "com.jxy.edu.common")
public class ManageMediaApplication {
    public static void main(String[] args) {
        SpringApplication.run(ManageMediaApplication.class,args);
    }

    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate(new OkHttp3ClientHttpRequestFactory());
    }
}
